require 'point'
require 'osx/cocoa'
include OSX

module ConversionHelpers
  def NSPointToPoint(p)
    Point.new(p.x, p.y)
  end
  
  def PointToNSPoint(p)
    NSMakePoint(p.x, p.y)
  end
  
  def RectToNSRect(r)
    NSMakeRect(r[0], r[1], r[2], r[3])
  end
  
  def NSRectToRect(r)
    [r.x, r.y, r.width, r.height]
  end
end